<script type="text/javascript" language="javascript" src="getPrice.js"></script>
<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'customer-form',
	'enableAjaxValidation'=>false,
	//'clientOptions'=>array('validateOnSubmit'=>true),

)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php //echo $form->errorSummary(array($model,$bill)); ?>


	<div class="row">
		<?php echo $form->labelEx($model,'c_fname'); ?>
		<?php echo $form->textField($model,'c_fname',array('size'=>40,'maxlength'=>50)); ?>
		<?php echo $form->error($model,'c_fname'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'c_lastname'); ?>
		<?php echo $form->textField($model,'c_lastname',array('size'=>40,'maxlength'=>50)); ?>
		<?php echo $form->error($model,'c_lastname'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'c_address'); ?>
		<?php echo $form->textField($model,'c_address',array('size'=>40,'maxlength'=>128)); ?>
		<?php echo $form->error($model,'c_address'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'c_email'); ?>
		<?php echo $form->textField($model,'c_email',array('size'=>40,'maxlength'=>128)); ?>
		<?php echo $form->error($model,'c_email'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'c_phone'); ?>
		<?php echo $form->textField($model,'c_phone',array('size'=>40,'maxlength'=>20)); ?>
		<?php echo $form->error($model,'c_phone'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'c_purchasedate'); ?>
		<?php //echo $form->textField($model,'c_purchasedate'); ?>
		<?php
                $this->widget('zii.widgets.jui.CJuiDatePicker', array(
                    'id'=>'c_purchasedate',
                    'model'=>$cusinfo,
                    'attribute'=>'c_purchasedate',
                    // additional javascript options for the date picker plugin
                    'options'=>array(
                        'showAnim'=>'fold',
                        'dateFormat'=>'yy-mm-dd',
                    ),
                    'htmlOptions'=>array(
                    	'value'=>Date('Y-m-d'),
                    ),
                ));
            ?>
		<?php echo $form->error($model,'c_purchasedate'); ?>
	</div>
	
	<div class="row">
		<?php echo $form->labelEx($bill,'product_id'); ?>
		<?php echo $form->textField($bill,'product_id'); ?>
		<div id="price"><b>Price: </b></div>
		<?php echo $form->error($bill,'product_id'); ?>
	</div>
	
	
	<div class="row">
		<?php echo $form->labelEx($bill,'amount'); ?>
		<?php echo $form->textField($bill,'amount'); ?>
		<?php echo $form->error($bill,'amount'); ?>
	</div>
	
	<div class="row">
		<?php echo $form->labelEx($model,'c_totalmoney'); ?>
		<?php echo $form->textField($model,'c_totalmoney'); ?>
		<?php echo $form->error($model,'c_totalmoney'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

	<!-- Start my form -->

<?php $this->endWidget(); ?>

</div><!-- form -->
